{extend name="admin@index_layout"/}
{block name="main"}
<style>
    .layui-form-label {
        width: 130px !important;
    }

    .layui-form-item .layui-input-inline {
        width: 268px !important;
    }

    .item-upgrade {
        margin-left: -30px;
    }

    .item-upgrade .layui-input-inline, .item-ratio .layui-input-inline {
        width: 66px !important;
    }

    .number-input {
        text-align: center;
    }

    .desc .layui-elem-quote {
        margin-top: 20px;
    }

    .desc p {
        font-size: 16px;
    }
    .layui-form-radio *{
        color: #0C0C0C !important;
    }
</style>
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-tab layui-tab-card">
            <div class="layui-col-lg8 layui-col-md8 layui-tab-content">
                <form class="layui-form level-form" method="post" id="levelForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">分销指数</label>
                        <div class="layui-input-block">
                            {volist name="type" id="v"}
                            <input disabled lay-filter="type" type="radio" name="type" value="{$key}" title="{$v}" {if $key==$info['type']}checked='' {/if}>
                            {/volist}
                        </div>
                    </div>
                    <hr class="layui-bg-red"/>

                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline">
                            <input readonly class="layui-input" type="text" name="level[0][name]"
                                   value="{$info['level'][0]['name']|default=''}" autocomplete="off"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">等级图标</label>
                        <div class="layui-input-inline item-icon">
                            <div class="icon">
                                {notempty name="$info['level'][0]['icon']"}
                                <div class="file-item thumbnail">
                                    <img data-original="{$info['level'][0]['icon']|get_file_path|default='__STATIC__/admin/img/none.png'}"
                                         src="{$info['level'][0]['icon']|get_file_path|default='__STATIC__/admin/img/none.png'}"
                                         width="100"
                                         style="max-height: 100px;">
                                </div>
                                {/notempty}
                            </div>
                        </div>
                    </div>
                    <div class="item-ratio">
                        <div class="layui-form-item">
                            <label class="layui-form-label">分享赚/自买返比例</label>
                            <div class="layui-input-inline">
                                <input readonly class="layui-input number-input" type="number" min="0" max="100"
                                       name="level[0][ratio]" value="{$info['level'][0]['ratio']|default=0}"
                                       autocomplete="off"/>
                            </div>
                            <div class="layui-form-mid">%</div>

                            <div class="ratio-one">
                                <label class="layui-form-label">直推一级</label>
                                <div class="layui-input-inline">
                                    <input readonly class="layui-input number-input" type="number" min="0" max="100"
                                           name="level[0][ratio_one]" value="{$info['level'][0]['ratio_one']|default=0}"
                                           autocomplete="off"/>
                                </div>
                                <div class="layui-form-mid">%</div>
                            </div>


                        </div>
                    </div>

                    <hr class="layui-bg-red"/>

                    <div class="layui-form-item">
                        <label class="layui-form-label">做任务完成升级</label>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">任务一：</label>
                        <div class="layui-input-inline item-upgrade">
                            <label class="layui-form-label">邀请有效推客达到</label>
                            <div class="layui-input-inline">
                                <input readonly class="layui-input number-input" type="number" min="0" max="100"
                                       name="invite" value="{$invite|default=0}"
                                       autocomplete="off"/>
                            </div>
                            <div class="layui-form-mid">人</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">任务二：</label>
                        <div class="layui-input-inline item-upgrade">
                            <label class="layui-form-label">推广结算收益达到</label>
                            <div class="layui-input-inline">
                                <input readonly class="layui-input number-input" type="number" min="0" name="income"
                                       value="{$income|default=0}"
                                       autocomplete="off"/>
                            </div>
                            <div class="layui-form-mid">元</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推客任务升级条件</label>
                        <div class="layui-input-block">
                            <input disabled lay-filter="task_condition" type="radio" name="task_condition" value="0"
                                   title="通过联系客服升级等级" {if $task_condition== 0} checked='' {/if}>
                            <input disabled lay-filter="task_condition" type="radio" name="task_condition" value="1"
                                   title="完成任一个任务即可升级" {if $task_condition== 1} checked='' {/if}>
                            <input disabled lay-filter="task_condition" type="radio" name="task_condition" value="2"
                                   title="须同时完成任务一和任务二" {if $task_condition== 2} checked='' {/if}>
                        </div>
                    </div>

                    <hr class="layui-bg-red"/>

                    <div class="layui-form-item">
                        <label class="layui-form-label"
                               style="width: 220px !important;">任务完成后即可升级至下一等级</label>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline">
                            <input readonly class="layui-input" type="text" name="level[1][name]"
                                   value="{$info['level'][1]['name']|default=''}" autocomplete="off"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">等级图标</label>
                        <div class="layui-input-inline item-icon">
                            <div class="icon">
                                {notempty name="$info['level'][1]['icon']"}
                                <div class="file-item thumbnail">
                                    <img data-original="{$info['level'][1]['icon']|get_file_path|default='__STATIC__/admin/img/none.png'}"
                                         src="{$info['level'][1]['icon']|get_file_path|default='__STATIC__/admin/img/none.png'}"
                                         width="100"
                                         style="max-height: 100px;">
                                </div>
                                {/notempty}
                            </div>
                        </div>
                    </div>

                    <div class="item-ratio">
                        <div class="item-ratio">
                            <div class="layui-form-item">
                                <label class="layui-form-label">分享赚/自买返比例</label>
                                <div class="layui-input-inline">
                                    <input readonly class="layui-input number-input" type="number" min="0" max="100"
                                           name="level[1][ratio]" value="{$info['level'][1]['ratio']|default=0}"
                                           autocomplete="off"/>
                                </div>
                                <div class="layui-form-mid">%</div>

                                <div class="ratio-one">
                                    <label class="layui-form-label">直推一级</label>
                                    <div class="layui-input-inline">
                                        <input readonly class="layui-input number-input" type="number" min="0" max="100"
                                               name="level[1][ratio_one]"
                                               value="{$info['level'][1]['ratio_one']|default=0}"
                                               autocomplete="off"/>
                                    </div>
                                    <div class="layui-form-mid">%</div>
                                </div>


                            </div>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-col-lg4 layui-col-md4 layui-tab-content desc" style="padding: 20px 40px;">
                <blockquote class="layui-elem-quote">
                    <h2>v0，v1是什么？</h2>
                </blockquote>
                <p>v0、v1代表【推客身份等级】。类似于爱*艺会员一样。普通用户和黄金会员享受的权益不同。
                    用户进入小程序，默认是v0等级，只能按照v0等级的佣金比例获得佣金。当用户等级达到v1后，就可以按照
                    v1等级的比例获得佣金。所以v1等级的比例应该比v0设置的比例要高，这样用户才能有动力去升级。</p>

                <blockquote class="layui-elem-quote">
                    <h2>推客佣金是什么？</h2>
                </blockquote>
                <p>
                    推客可以在小程序中推广商品赚取佣金。当推客在小程序中将一件商品【分享】给其他用户【或自己购买】，该用户购买了该商品后，该推客就可以按照【推客身份等级】的【分享赚/自买返比例】获得佣金收益</p>

                <blockquote class="layui-elem-quote">
                    <h2>直推一级是什么？</h2>
                </blockquote>
                <p>
                    推客可以通过分享海报或者转发小程序，邀请其他微信用户进入小程序成为推客并自动加入自己的下级团队。下级团队中的推客推广任意商品后，其直属上级推客可以按照【推客身份等级】的【直推一级比例】获得佣金收益</p>

                <img style="width: 100%; margin-top: 40px;" src="__STATIC__/common/img/fenxiao.png" alt="">
            </div>
        </div>
    </div>
</div>

{/block}
